﻿<!DOCTYPE html>
<html>
<head>
<title>自助考试工具</title>
<meta http-equiv="Content-type" content="text/html;charset=UTF-8"/>

<link rel="stylesheet" type="text/css" href="Exam.css" /> 

<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="xlsx.core.min.js"></script>
<script type="text/javascript" src="common.js"></script>
<script type="text/javascript" src="Exam.js"></script>
</head>

<!--键盘输入调用-->
<body onkeyup="KeyEvent(event)" onload="init()">
<!-- 主体 div -->    
    <div id="head">
        <div id="head_1">自　助　考　试　工　具</div>
        <div id="head_2">garage technology　车库科技</div>
        <div id="head_3">
            <button id="btn_ImportArea" onclick="show_divRightTop()">隐藏面板</button>
        </div>
	</div>
    <hr>
    <!-- 文件导入操作区-->
    
    <!-- div_1 用于包含所有可隐藏的面板-->
    <div id="div_1">
        <div id="div_1_1" >
            
            <label>选择试题文件</label>
            <!-- 选择文件框 -->
            <input id="input_ImportFromFile" type="file" 
                accept=" application/vnd.openxmlformats-officedocument.spreadsheetml.sheet," 
                onchange = "readFile()" title="选择试题文件"/>

            <!-- 实时显示文件格式 -->
            <label id="label_filetype" style="">文件类型</label><label id="label_ImportFileType" style="color:#FFF">　　　</label><a>　</a>
            
            <!-- 下拉框，提供所有sheet以选择 -->
            <label style="">选择表名</label>
            <select id="select_ChooseSheet" onchange="previewHeader(null)" >
            </select>
            <p>
            <label>选择本地错题本</label>
            <input id="input_ErrorQues" type="file" onchange="loadErrors()" accept="text/plain" />
            </p>
           
        </div>
        
        <!-- 操作区-->
        <div id="div_2">
            <!-- 选择题干列-->
            <div style="width:9%;">
                <label title="选择题目内容所在列" for="input_quecol">题目</label>
                <input type="text" id="input_quecol" class="input_col" min="1" onchange="preview(null)" value="A"/>
            </div>
            
            <!-- 选择题型列-->
            <div style="width:9%;">
                <label title="选择题型所在列" for="input_typecol">题型</label>
                <input type="text" id="input_typecol" class="input_col" min="1" onchange="preview(null)"value="B"/>
            </div>
            
            <!-- 选项的列分布类型：0=单格，1=多格 -->
            <div style="width:42%;">
                <label title="选择答案如何分布以及所在的列；选择多列时，填写选项覆盖的起始、终结列" style="">选项类型</label>
                <input type="radio" name="input_optcol" id="input_optMode0" onclick="switchOptColMode()" title="选项在一列"checked="checked" /><label for="input_optMode0">单列</label>
                <input type="radio" name="input_optcol" id="input_optMode1" onclick="switchOptColMode()" title="选项在多列" /><label for="input_optMode1">多列</label>
                
                <label for="input_optcol0" style="margin-left:1em">始列</label>
                <input type="text" id="input_optcol0"  class="input_col" onchange="preview(null)" value="C"/>
                <label id="label_delim" for="input_delim">分隔符</label>
                <input type="text" id="input_delim" onchange="preview(null)" value="$:$" style="width:2em;"/>
                <label id="label_optEnd" style="display:none;" for="input_optcol1">终列</label>
                <input type="text" id="input_optcol1" onchange="preview(null)" value="C" style="width:2em;display:none;"/>
            </div>
            
            <!-- 答案列 -->
            <div style="width:9%;">
                <label title="选择答案所在列" for="input_anscol">答案</label>
                <input type="text" id="input_anscol" min="1" onchange="preview(null)" value="D" style="width:2em;"/>
            </div>
                    
            <div style="width:9%;">
                <label title="选择解释所在列" for="input_expcol">解释</label>
                <input type="text" id="input_expcol" min="1" onchange="preview(null)" value="E" style="width:2em;"/>
            </div>
                    
            <div style="width:11%">
                <label title="选择数据起始行编号，从1开始" for="input_startRow">起始行</label>
                <input type="number" id="input_startRow" min="1" onchange = "preview(null)" value=2 style="width:2em"/>
            </div>
            
            <div style="width:11%;margin-right:0em;text-align:center">
            <!-- 数据导入按钮 -->
            <button id="btn_Import" onclick="importData()"
            title="从文件中导入题库，请选择正确的数据起始行。重新导入题库将重置时间、丢失上一阶段战果">导入题库</button>
            </div>
        </div>
        <!-- 数据预览区 -->
        <div id="div_3">
            <div id="div_3_left">
                <table id="tab_preview">
                    <tr>
                        <th style="width:40%;">试题内容</th>
                        <th style="width:4%;">题型</th>
                        <th style="width:27%;">选项</th>
                        <th style="width:4%;">答案</th>
                        <th style="width:25%;">解释</th>
                    </tr>
                    <tr>
                        <td><div id="td_que">显示试题内容</div></td>
                        <td><div id="td_type">显示试题题型</div></td>
                        <td><div id="td_opt" style="overflow-y:scroll">显示选项</div></td>
                        <td><div id="td_ans">显示答案</div></td>
                        <td><div id="td_exp">显示本题释义</div></td>
                    </tr>
                </table>
            </div>
            
            <div id="div_3_right">
                <input type="checkbox" id="cb_ooo" onclick="checkooo()" checked="checked" title="选中时，选项随机乱序" /><label for="cb_ooo">启用乱序</label>
                <br/>
                <input type="checkbox" id="cb_NextQ" onclick="checkNextQ()" checked="checked" title="选中时，答对直接跳转下一题" /><label for="cb_NextQ">自动下一题</label>
                <br/>
                <input type="checkbox" id="cb_effects" onclick="checkEffects()" title="选中时，会有催人泪下的渣特效"/><label for="cb_effects">五毛钱特效</label>
            </div>
        </div>
    </div>
    
    
    <!-- 进度条区 -->
    <div id="div_4">
        <div id="b_1">
            <div id="b_1_t" style="width:14%;height:50%">单选</div>
            <div id="b_1_0" style="width:0%;height:50%"></div>
        </div>
        <div id="b_2">
            <div id="b_2_t" style="width:14%;height:50%">多选</div>
            <div id="b_2_0" style="width:0%;height:50%"></div>
        </div>
        <div id="b_3">
            <div id="b_3_t" style="width:14%;height:50%">判断</div>
            <div id="b_3_0" style="width:0%;height:50%"></div>
        </div>
        <div id="b_4">
            <div id="b_4_t" style="width:14%;height:50%">不定项</div>
            <div id="b_4_0" style="width:0%;height:50%"></div>
        </div>
        <div id="b_5">
            <div id="b_5_t" style="width:14%;height:50%">填空</div>
            <div id="b_5_0" style="width:0%;height:50%"></div>
        </div>
        <div id="b_6">
            <div id="b_6_t" style="width:14%;height:50%">排序</div>
            <div id="b_6_0" style="width:0%;height:50%"></div>
        </div>
        <div id="b_7">
            <div id="b_7_t" style="width:14%;height:50%">论述</div>
            <div id="b_7_0" style="width:0%;height:50%"></div>
        </div>
    </div>
   
    <!-- 显示区 -->
    <div id="div_5">
        <button id="btnErrList" type="button" onclick="showErrList()">错题本(Q)</button>
        <label>&nbsp;</label>
        <button id="btnShowAll" type="button" onclick="showAll()">全部(W)</button>
        <label >&nbsp;</label>
        <span id="Timer" onload="UpdateTime()">00:00:00</span>
        <label >&nbsp;</label>
        <button id="Pause" type="button" onclick="PauseTest()">开始(R)</button>
        <label >&nbsp;</label>
        <button id="ExportErr" type="button" onclick="makeErrDownload()">导出错题(T)</button>
        <div id="divQues" style="font-weight:bold;">
        </div>
        <div id="divChoice">
        </div>
        <div>
        <span id="divAns" style="font-weight:bold;color:red;height:50px;"></span>
        <label >&nbsp;</label>
        <span id="divNotes" style="font-weight:bold;color:red;height:50px;"></span>
        </div>
        <br></br>
        <button id="PrevQues" type="button" onclick="previous()">上题(Z)</button>
        <label >&nbsp;</label>
        <button id="btnSubmit" type="button" onclick="checkAns()">提交(S)</button>
        <label >&nbsp;</label>
        <button id="Ans" type="button" onclick="viewAns()">答案(X)</button>
        <label >&nbsp;</label>
        <button id ="NextQues" type="button" onclick="next()">下题(V)</button>

        <br></br>

        第<input type="number" id="txtNum" style="font-size:24px;width:260px"></input>题
        <label >&nbsp;</label>
        <button type="button" onclick="GoTo()">跳转</button>
    </div>
    <div style="width:100%">
    <!-- 显示combo 文字-->
    <label id="label_combo"></label>
    </div>
</body>

</html>